package com.cloudcc.cloudframe.bus;

import com.cloudcc.cloudframe.util.StringUtils;

public class BaseEvent implements IEvent {

	/**
	 * 登录失效
	 */
	public static final int SC_LOGIN_INVAILED =10006;
	/**
	 * 没有网络
	 */
	public static final int NET_NO_NETWORK =10007;
	
	private boolean ok;
	private String message = StringUtils.EMPTY;
	private int statusCode;

	@Override
	public boolean isOk() {
		return ok;
	}

	@Override
	public void setOk(boolean ok) {
		this.ok = ok;
	}

	@Override
	public int getStatusCode() {
		return statusCode;
	}

	@Override
	public void setStatusCode(int statusCode) {
		this.statusCode = statusCode;
	}

	@Override
	public String getMessage() {
		return message;
	}

	@Override
	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	public boolean isError() {
		return !ok;
	}

}
